package com.example.messagemodule.listener;

import com.hyphenate.EMCallBack;
import com.hyphenate.chat.EMMessage;

import org.greenrobot.eventbus.EventBus;

/**
 * Created by SHICHENG
 * <p>
 * Time on
 */
public class IMSendMessageListener implements EMCallBack {

    EMMessage message;

    public IMSendMessageListener(EMMessage message) {
        this.message = message;
    }

    @Override
    public void onSuccess() {
        EventBus.getDefault().post(new EventBusMessageWrap(message,MessageListenerType.SendSuccess));
    }

    @Override
    public void onError(int code, String error) {
        EventBus.getDefault().post(new EventBusMessageWrap(message,MessageListenerType.SendError));
    }

    @Override
    public void onProgress(int progress, String status) {

    }
}
